<template>
    <div>
        <!-- 展示面板：切换登录和首页 -->
        <Home v-if='show === "home"'></Home>
        <Login @getShow='getShow' v-else></Login>
    </div>
</template>
<script>
import Login from './Login';
import Home from './Home';
export default {
    components:{Home,Login},
    data(){
        return {
            show:'home'
        }
    },
    methods:{
        getShow(name){
            this.show=name;
        }
    }
}
</script>